﻿using System;
using System.Windows.Forms;
using Mersiv.Lib.Wrapper;

namespace Mersiv.App.Client.Data
{
  public class HgRepositoryTreeNode : System.Windows.Forms.TreeNode
  {

    //
    // Sub-nodes will be handled with a callback mechanism.
    //
    // Sub-node events are handled here and trigger the callback, passing 
    // along the data object which in turn updates the UI as needed.

    private HgRepository repository;
    public HgRepository Repository
    {
      get
      {
        return this.repository;
      }
      set
      {
        this.repository = value;
        this.Text = this.repository.Name;
        this.ToolTipText = this.repository.WorkingDirectory;
      }
    }

  }
}